.TH LIBPFM 3  "November, 2002" "" "Linux Programmer's Manual"
.SH NAME
pfm_start, pfm_stop \- start and stop monitoring for a self-monitoring process
.SH SYNOPSIS
.nf
.B #include <perfmon/pfmlib.h>
.sp
.BI "void pfm_start(void);"
.BI "void pfm_stop(void);"
.sp
.SH DESCRIPTION
These two function can only be used by self-monitoring processes. 
They have no effect on system wide sessions.
.sp
The \fBpfm_start\fR function activates monitoring by setting the
\fBpsr.up\fR bit. This has no effect if the process has not created
a perfmon context and enabled it. This function is equivalent to
calling \fBperfmonctl()\fR with the \fBPFM_START\fR command. 
.sp
The \fBpfm_stop\fR function activates monitoring by clearing the
\fBpsr.up\fR bit. This has no effect if the process has not created
a perfmon context and enabled it. This function is equivalent to
calling \fBperfmonctl()\fR with the \fBPFM_STOP\fR command. 

The first difference with the \fBperfmonctl()\fR call is that 
there is no kernel call involved, therefore it is a much lighter weight call.
In fact these functions are defined as macros that are inlined. They are
useful when measuring short sections of code. The second difference 
is that they apply only to the context of the caller.

.SH RETURN
nothing is returned.
.SH ERRORS
no errors are returned. If the caller has no perfmon context, the functions
have no effect.
.SH AUTHOR
Stephane Eranian <eranian@hpl.hp.com>
.PP
